###User Defined Function###
_MemGlobalReAlloc

###Description###
ReAllocates the specified number of bytes from the heap

###Syntax###
#include <Memory.au3>
_MemGlobalReAlloc ( $hMemory, $iBytes [, $iFlags = 0] )

###Parameters###
@@ParamTable@@
$hMemory
	A handle to the global memory object to be reallocated. This handle is returned by either the <a href="_MemGlobalAlloc.htm">_MemGlobalAlloc</a> or <a href="_MemGlobalReAlloc.htm">_MemGlobalReAlloc</a> function.
$iBytes
	The new size of the memory block, in bytes. If $iFlags specifies $GMEM_MODIFY, this parameter is ignored.
$iFlags
	[optional] The memory allocation attributes:
		$GMEM_MOVEABLE - optionally combine with $GMEM_MODIFY.
		If the memory is a locked $GMEM_MOVEABLE memory block or a $GMEM_FIXED memory block and this flag is not specified, the memory can only be reallocated in place
		$GMEM_ZEROINIT - If this parameter does not specify $GMEM_MODIFY, initializes additional memory contents to zero if the memory object is growing in size.
@@End@@

###ReturnValue###
@@ReturnTable@@
Success:	a handle to the newly reallocated memory object.
Failure:	0.
@@End@@

###Remarks###
If <a href="_MemGlobalReAlloc.htm">_MemGlobalReAlloc</a> reallocates a movable object, the return value is a handle to the memory object. To convert the handle to a pointer, use the <a href="_MemGlobalLock.htm">_MemGlobalLock</a> function.

If <a href="_MemGlobalReAlloc.htm">_MemGlobalReAlloc</a> reallocates a fixed object, the value of the handle returned is the address of the first byte of the memory block. To access the memory, a process can simply cast the return value to a pointer.

If <a href="_MemGlobalReAlloc.htm">_MemGlobalReAlloc</a> fails, the original memory is not freed, and the original handle and pointer are still valid.

###Related###
_MemGlobalFree, _MemGlobalLock, _MemGlobalAlloc, _MemGlobalSize, _MemVirtualAlloc

###See Also###
@@MsdnLink@@ GlobalReAlloc
